{
    abstract class Animal {
        private _name: string;
        private _age: number;

        constructor(name: string, age: number) {
            this._name = name;
            this._age = age;
        }

        get name(): string {
            return this._name;
        }

        set name(value: string) {
            this._name = value;
        }

        get age(): number {
            return this._age;
        }

        set age(value: number) {
            this._age = value;
        }

        abstract bark(): void;

        run() {
            console.log(`${this._name} run...`);
        }
    }

    interface IBehave {
        bark(): void;
        run(): void;
        eat(): void;
    }

    class Dog extends Animal implements IBehave{
        bark(): void {
            console.log("汪汪汪~");
        }

        run() {
            console.log("-----------------");
            super.run();
        }

        eat(): void {
            console.log(`${this.name} eat`);
        }
    }

    class Cat extends Animal implements IBehave{
        bark(): void {
            console.log("喵喵喵~");
        }

        run() {
            console.log("-----------------");
            super.run();
        }

        eat(): void {
            console.log(`${this.name} eat`);
        }
    }

    class Utils {
        static f1<T>(a: T): T {
            return a;
        }

        static f2<T, K>(a: T, b: K) {
            console.log(a, b);
        }
    }

    let dog = new Dog('张三', 18);
    console.log(dog);
    dog.bark();
    dog.run();
    dog.eat();

    let cat = new Cat("李四", 20);
    console.log(cat);
    cat.bark();
    cat.run();
    cat.eat();
    console.log(Utils.f1(12));
    console.log(Utils.f1("abc"));
    Utils.f2(1, "abc");
}